RtGetPhysicalAddress

RtGetPhysicalAddress returns the physical address for the virtual address of a contiguous physical memory buffer previously allocated by RtAllocateContiguousMemory or RtAllocateContiguousMemorySpecifyCache.

In the RTSS environment, this function applies to all memory allocation. In the Windows environment, it applies to contiguous memory allocation only.

Syntax

LARGE_INTEGER RtGetPhysicalAddress(
    PVOID pVirtualAddress
);

Parameters

pVirtualAddress

The virtual address of the base of a contiguous memory buffer as returned by RtAllocateContiguousMemory or RtAllocateContiguousMemorySpecifyCache.

Return Value

The physical address corresponding to the base virtual address of the contiguous buffer if the function succeeds, a NULL pointer if the function fails (usually the result of an invalid parameter)

Remarks

RtGetPhysicalAddress allows the user to get the base physical address for a contiguous memory buffer allocated by RtAllocateContiguousMemory or RtAllocateContiguousMemorySpecifyCache. The system physical addresses are eight-byte data types, returned as a LARGE_INTEGER.

In the RTSS environment, this call can be used on any virtual address.

Requirements

Minimum Supported Version RTX64 2013
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtAllocateContiguousMemory

RtAllocateContiguousMemorySpecifyCache

RtFreeContiguousMemory